home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / AHDI / TESTSPAR / SPSCSI.H < prev    next >
Encoding:
Text File  |  2001-02-09  |  1.6 KB  |  62 lines

  1. ;+
  2. ; Edit History
  3. ;
  4. ; Jul-11-90    ml.    Created this for files that need to know SCSI
  5. ;             addresses.
  6. ;-
  7.  
  8. ; Conditional assembly
  9. SPSCDMA        equ    1        ; 1: do Sparrow SCSI
  10.  
  11. bSPSCSI        equ    $88    ; base of SCSI bus
  12.  
  13. ; SCSI Interface (NCR 5380) for READ operations
  14. SPSCSIDB    equ    bSPSCSI+0    ; SCSI data bus
  15. SPSCSIICR    equ    bSPSCSI+1    ; initiator command register
  16. SPSCSIMR    equ    bSPSCSI+2    ; mode register
  17. SPSCSITCR    equ    bSPSCSI+3    ; target command register
  18. SPSCSICR    equ    bSPSCSI+4    ; current SCSI control register
  19. SPSCSIDSR    equ    bSPSCSI+5    ; DMA status register
  20. SPSCSIIDR    equ    bSPSCSI+6    ; input data register
  21. SPSCSIREI    equ    bSPSCSI+7    ; reset error / interrupt
  22.  
  23.  
  24. ; SCSI Interface (NCR 5380) for WRITE operations
  25. SPSCSIODR    equ    bSPSCSI+0    ; output data register
  26. ;SPSCSIICR    equ    bSPSCSI+1    ; initiator command register
  27. ;SPSCSIMR    equ    bSPSCSI+2    ; mode register
  28. ;SPSCSITCR    equ    bSPSCSI+3    ; target command register
  29. SPSCSIISR    equ    bSPSCSI+4    ; ID select register
  30. SPSCSIDS    equ    bSPSCSI+5    ; start DMA send
  31. SPSCSIDTR    equ    bSPSCSI+6    ; start DMA target receive
  32. SPSCSIDIR    equ    bSPSCSI+7    ; start DMA initiator receive
  33.  
  34.  
  35. ; Macros to talk to the NCR5380 through the ACSI DMA chip
  36.  
  37. .macro    RSCSI    srcreg,dst    ; read from specified register
  38.     move.w    \srcreg,WDL
  39.     move.w    WDC,\dst
  40. .endm
  41.  
  42. .macro    WSCSI    val,dstreg    ; write to specified register
  43.     move.w    \dstreg,WDL
  44.     move.w    \val,WDC
  45. .endm
  46.  
  47.  
  48. ;+
  49. ; Rstdelay()
  50. ;    After talking to the DMA chip in a way that may reset it, 
  51. ; we need a 8 8Mhz clocks (ie. 1 microsec) delay, before we can
  52. ; talk to the chip again.
  53. ;-
  54. .macro    RSTDELAY
  55.     tst.b    GPIP            ; delay for 1 microsec
  56.     tst.b    GPIP            ; this amounts to 16 16Mhz clocks
  57.     tst.b    GPIP
  58.     tst.b    GPIP
  59. .endm
  60.  
  61.  
  62.